#include <iostream>
#include "lgy_stl_alloc.h"
#include "lgy_stl_construct.h"

using namespace::lgy;
using namespace::std;

template <typename T>
T* my_new(const T& t)
{
	T* p;
	lgy::simply_alloc<T, lgy::alloc> Alloc;

	if((p=Alloc.allocate())==NULL){
		cout<<"Unbale to alloc"<<endl;
	}
	construct(p, t);	

	return p;
}

int main()
{
	
	int *p;

	p = my_new(5);
	cout<<*p<<endl;

	return 0;
}
